package main

import (
"web" 
"http"
"io"
)

func hello(ctx *web.Context){
    resp,_,_ := http.Get("http://www.izaobao.us/index.php/feed/")
    io.Copy(ctx,resp.Body)
    defer resp.Body.Close()
}

func gidden(ctx *web.Context,url string) {
    resp,_,_ := http.Get("http://127.0.0.1:9004/"+ url)
    io.Copy(ctx,resp.Body)
    defer resp.Body.Close()
}

func main(){
    web.Get("/proxy/izaobao", hello)
    web.Get("/proxy/gidden/(.*)",gidden)
    web.RunFcgi("127.0.0.1:9003")
}

